package com.uphone.kingmall.adapter;

import android.widget.ImageView;

import com.blankj.utilcode.util.SizeUtils;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.china.zhuoyue.R;
import com.uphone.kingmall.bean.GoodsListBean;
import com.uphone.kingmall.utils.GlideUtils;

/**
 * author : SuMeng
 * e-mail : 986335838@qq.com
 * time   : 2019/02/16
 * desc   : xxxx 描述
 */
public class HomeDaPaiAdapter extends BaseQuickAdapter<GoodsListBean.DataBean, BaseViewHolder> {

    public HomeDaPaiAdapter() {
        super(R.layout.kingmall_item_home_dapai);
    }

    @Override
    protected void convert(final BaseViewHolder helper, final GoodsListBean.DataBean item) {
        helper.setText(R.id.tv_price, "￥" + item.getGoodsPrice());
        helper.setText(R.id.tv_sales, "月销:" + item.getGoodsSaleNum());
        helper.setText(R.id.tv_title, item.getGoodsName());
        ImageView iv_lawyer_icon = helper.getView(R.id.iv_dapai);
        GlideUtils.getInstance().loadCornerImage(mContext, item.getGoodsMainImg(), SizeUtils.dp2px(4), iv_lawyer_icon);

    }
}